﻿using App.Chat.Models;

namespace App.Chat.StaticData
{
    public class DataSource
    {
        public static List<User> Users;
        public static List<Group> Groups;
        public static List<Friend> Friends;
        public static List<UserRefGroup> UserRefGroups;
        static DataSource()
        {
            InitUsers();
            //InitGroups();
            InitFriends();
            //InitUserRefGroups();
        }

        private static void InitUserRefGroups()
        {
            throw new NotImplementedException();
        }

        private static void InitFriends()
        {
            Friends = new List<Friend>();
            Friends.Add(new Friend
            {
                FriendId = "1",
                UserId = "2",
                FriendRemark = "测试"
            });
            Friends.Add(new Friend
            {
                FriendId = "2",
                UserId = "1",
                FriendRemark = "测试2"
            });
        }

        private static void InitGroups()
        {
            throw new NotImplementedException();
        }

        private static void InitUsers()
        {
            Users = new List<User>();
            Users.Add(new User
            {
                Id = "1",
                UserName = "测试用户1",
                Password = "12345678",
                Phone = "12345678901",
                Avatar = null
            });
            Users.Add(new User
            {
                Id = "2",
                UserName = "测试用户2",
                Password = "12345678",
                Phone = "12345678901",
                Avatar = null
            });
            Users.Add(new User
            {
                Id = "3",
                UserName = "测试用户3",
                Password = "12345678",
                Phone = "12345678901",
                Avatar = null
            });
            Users.Add(new User
            {
                Id = "4",
                UserName = "测试用户4",
                Password = "12345678",
                Phone = "12345678901",
                Avatar = null
            });
        }
    }
}